﻿@model RedSand.Site.Models.SlideInfo
<div class="dialog" title="Thêm ảnh" style="width: 990px;">
    @using (Ajax.BeginForm(AdminAjaxOptions.UpdateRecord))
    {
        <div class="dialog-content">
            <div class="fl" style="width: 488px">
                <div class="form-cell" style="width: 100%">
                    @Html.HiddenFor(model => model.SlideID)
                    @Html.LabelFor(model => model.Title)
                    @Html.EditorFor(model => model.Title)
                </div>
                <div class="form-cell" style="width: 100%">
                    @Html.LabelFor(model => model.Link)
                    @Html.EditorFor(model => model.Link)
                </div>
                <div class="form-cell" style="width: 100%">
                    @Html.LabelFor(model => model.Description)
                    @Html.TextAreaFor(model => model.Description)
                </div>
                <div class="form-cell">
                    @Html.LabelFor(model => model.Status)
                    @Html.DropDownListFor(model => model.Status, DropDownListHelper.GetStatusList(false))
                </div>
                <div class="form-cell" style="width: 296px">
                    @Html.LabelFor(model => model.Image)
                    @Html.HiddenFor(model => model.Image)
                    <input type="text" name="NewImage" id="choose-avatar" class="choose-file" />
                </div>
            </div>
            <div class="fl" style="width: 460px; height: 222px; margin: 10px 0 0 20px; border: 1px solid #ccc">
                <img id="upload-image-preview" src="@Model.Image" alt="" width="460" height="222" />
            </div>
        </div>
        <div class="dialog-footer">
            <input type="submit" value="@Html.Translate("Save")" />
            <input type="button" value="@Html.Translate("Cancel")" onclick="closeDialog('.dialog')" />
        </div>
    }
</div>
